<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>A Walk Down Friargate</title>
	<link rel="stylesheet" href="css/default.css" type="text/css" />

<script language="javascript">
// Function to open a new window with fixed dimensions and position
// parameter url is the content that will be displayed in the window
function newWindow(url)  {
	var horsewindow = window.open(url , "horsewin", 
	"resizable = no , width=600, height=400" );
	horsewindow.moveTo(200,200);
}
</script>

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA-LoWsW-B1Zqqmn9VYxFYARTNVxN5rirKnkvFnNqZIAFJZBi_3BQYvbaU3Tb7d_p_qpwAtHOs1mZmmA"
            type="text/javascript"></script>
    <script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
		//map.setMapType(G_HYBRID_MAP);
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(53.761, -2.704), 16);

		//custom icon base info
		var baseIcon = new GIcon();
			baseIcon.shadow = "shadow50.png";
			baseIcon.iconSize = new GSize(20, 34);
			baseIcon.shadowSize = new GSize(56, 32);  //(37, 34)
			baseIcon.iconAnchor = new GPoint(9, 34)
			baseIcon.infoWindowAnchor = new GPoint(9, 2);
			baseIcon.infoShadowAnchor = new GPoint(18, 25);
			

function createMarker(latlng, img, title, text, image, link, main_text) {
        var letteredIcon = new GIcon(baseIcon);
				letteredIcon.image = img;  
				markerOptions = { icon:letteredIcon };

				nmarker = new GMarker(latlng, markerOptions);
				title = '<div id="popwin" style="float:left; width:200px; height:200px;"> <b>'+ title + '</b><br><img src="' + image + '" WIDTH="62" HEIGHT="100" BORDER="0" ALT="phil holifield" style="float:left; margin:2px;">' +  text + '<br><a href="' + link + '> more </a></div>';
//no target
       GEvent.addListener(nmarker, "click", function() {
          map.openInfoWindowHtml(latlng, title);
        });
      
        return nmarker;
      }

        
        GDownloadUrl("data3.xml", function(data) {
          var xml = GXml.parse(data);
          var markers = xml.documentElement.getElementsByTagName("marker");
		  

          for (var i = 0; i < markers.length; i++) {
            var latlng = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
                                    parseFloat(markers[i].getAttribute("lng")));
			var img = markers[i].getAttribute("img");  //get img
			var title = markers[i].getAttribute("title");  //get title
			var text = markers[i].getAttribute("text");  //get text
			var image = markers[i].getAttribute("image");  //get image for Gwindow
			var url = markers[i].getAttribute("link");  //get link
			var link = "javascript:newWindow(&quot;" + url + "&quot;)";  // using javascript function to open window
			//var link = "javascript:newWindow2(&quot;pages/black_horse.htm&quot;)";  //get link
			var main_image = markers[i].getAttribute("main_image");  //get image for more DIV
			var main_text = markers[i].getAttribute("main_text");  //get text for more DIV
	
				//now create the markers on the map adding each of the marker attributes
				map.addOverlay(createMarker(latlng,img,title,text,image,link, main_text));  

			}  //for
		});  //GDownload

      }  //if
    }  //initialise
    
    
    </script>
  </head>

  <body onload="initialize()" onunload="GUnload()">
    <div id="header"> <h1>A Walk Down Friargate</h1> </div>

<div id="nav">
	<a href="javascript:newWindow(&quot;pages/about.htm&quot;)">About</a>  
	<a href="javascript:newWindow(&quot;pages/credits.htm&quot;)">Credits</a>
	<a href="javascript:newWindow(&quot;pages/help.htm&quot;)">Help</a>
	

	</div>
	
	<div id="map_canvas"></div>
	
	<div id="footer"> <p>JISC Rapid Innovation Project - Designlab - University of Central Lancashire</p>  </div>
	
  </body>
</html>
